<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>MCUXpresso SDK API Reference Manual: GPIO Driver</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="fs_logo.gif"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">MCUXpresso SDK API Reference Manual
   &#160;<span id="projectnumber">Rev. 0</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__gpio__driver.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">GPIO Driver<div class="ingroups"><a class="el" href="group__gpio.html">GPIO: General-Purpose Input/Output Driver</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<p>The MCUXpresso SDK provides a peripheral driver for the General-Purpose Input/Output (GPIO) module of MCUXpresso SDK devices.</p>
<h1><a class="anchor" id="GPIOTpyUC"></a>
Typical use case</h1>
<h2><a class="anchor" id="GPIOInOps"></a>
Input Operation</h2>
<div class="fragment"><div class="line"><span class="comment">/*  Input pin configuration */</span></div>
<div class="line">EnableIRQ(EXAMPLE_SW_IRQ);</div>
<div class="line"><a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> sw_config = {</div>
<div class="line">    <a class="code" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4">kGPIO_DigitalInput</a>, 0,</div>
<div class="line">    <a class="code" href="group__gpio__driver.html#gga1b9ad57f43a7be04e31c2e43e92aca39ab874f7d31c4bf2f964bf52466d5c40f4">kGPIO_IntRisingEdge</a>,</div>
<div class="line">};</div>
<div class="line"><span class="comment">/* Sets the input pin configuration */</span></div>
<div class="line"><a class="code" href="group__gpio__driver.html#ga8d3aa26ad7e88ef1427e51242a70c259">GPIO_PinInit</a>(EXAMPLE_SW_GPIO, EXAMPLE_SW_GPIO_PIN, &amp;sw_config);</div>
</div><!-- fragment --> <table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structgpio__pin__config__t"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a></td></tr>
<tr class="memdesc:structgpio__pin__config__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">GPIO Init structure definition.  <a href="group__gpio__driver.html#structgpio__pin__config__t">More...</a><br/></td></tr>
<tr class="separator:structgpio__pin__config__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gada41ca0a2ce239fe125ee96833e715c0"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a> { <br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4">kGPIO_DigitalInput</a> = 0U, 
<br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9">kGPIO_DigitalOutput</a> = 1U
<br/>
 }</td></tr>
<tr class="memdesc:gada41ca0a2ce239fe125ee96833e715c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">GPIO direction definition.  <a href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">More...</a><br/></td></tr>
<tr class="separator:gada41ca0a2ce239fe125ee96833e715c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1b9ad57f43a7be04e31c2e43e92aca39"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a> { <br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#gga1b9ad57f43a7be04e31c2e43e92aca39a69d618dcf6fc01e5c8315ef1dd4aa66d">kGPIO_NoIntmode</a> = 0U, 
<br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#gga1b9ad57f43a7be04e31c2e43e92aca39af6c9ba431378e6290d7033b643e554da">kGPIO_IntLowLevel</a> = 1U, 
<br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#gga1b9ad57f43a7be04e31c2e43e92aca39aa445f82a63c5aa94a1e53cdcf52b71d3">kGPIO_IntHighLevel</a> = 2U, 
<br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#gga1b9ad57f43a7be04e31c2e43e92aca39ab874f7d31c4bf2f964bf52466d5c40f4">kGPIO_IntRisingEdge</a> = 3U, 
<br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#gga1b9ad57f43a7be04e31c2e43e92aca39a369cc36a7fda0eb55c4f509070c2d887">kGPIO_IntFallingEdge</a> = 4U, 
<br/>
&#160;&#160;<a class="el" href="group__gpio__driver.html#gga1b9ad57f43a7be04e31c2e43e92aca39ac1d74f985cbebbe8441f6053b8074a50">kGPIO_IntRisingOrFallingEdge</a> = 5U
<br/>
 }</td></tr>
<tr class="memdesc:ga1b9ad57f43a7be04e31c2e43e92aca39"><td class="mdescLeft">&#160;</td><td class="mdescRight">GPIO interrupt mode definition.  <a href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">More...</a><br/></td></tr>
<tr class="separator:ga1b9ad57f43a7be04e31c2e43e92aca39"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Driver version</h2></td></tr>
<tr class="memitem:ga5aa5229cbd041b11bcf8417ba12896b2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga5aa5229cbd041b11bcf8417ba12896b2">FSL_GPIO_DRIVER_VERSION</a>&#160;&#160;&#160;(MAKE_VERSION(2, 0, 0))</td></tr>
<tr class="memdesc:ga5aa5229cbd041b11bcf8417ba12896b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">GPIO driver version 2.0.0.  <a href="#ga5aa5229cbd041b11bcf8417ba12896b2">More...</a><br/></td></tr>
<tr class="separator:ga5aa5229cbd041b11bcf8417ba12896b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
GPIO Initialization and Configuration functions</h2></td></tr>
<tr class="memitem:ga8d3aa26ad7e88ef1427e51242a70c259"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga8d3aa26ad7e88ef1427e51242a70c259">GPIO_PinInit</a> (GPIO_Type *base, uint32_t pin, const <a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *Config)</td></tr>
<tr class="memdesc:ga8d3aa26ad7e88ef1427e51242a70c259"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the GPIO peripheral according to the specified parameters in the initConfig.  <a href="#ga8d3aa26ad7e88ef1427e51242a70c259">More...</a><br/></td></tr>
<tr class="separator:ga8d3aa26ad7e88ef1427e51242a70c259"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
GPIO Reads and Write Functions</h2></td></tr>
<tr class="memitem:gadb910aec9a8388b0a387b182a184dff7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gadb910aec9a8388b0a387b182a184dff7">GPIO_WritePinOutput</a> (GPIO_Type *base, uint32_t pin, uint8_t output)</td></tr>
<tr class="memdesc:gadb910aec9a8388b0a387b182a184dff7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the individual GPIO pin to logic 1 or 0.  <a href="#gadb910aec9a8388b0a387b182a184dff7">More...</a><br/></td></tr>
<tr class="separator:gadb910aec9a8388b0a387b182a184dff7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f8a8be69355039abd8b1ddf2a236f4c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga2f8a8be69355039abd8b1ddf2a236f4c">GPIO_SetPinsOutput</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga2f8a8be69355039abd8b1ddf2a236f4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple GPIO pins to the logic 1.  <a href="#ga2f8a8be69355039abd8b1ddf2a236f4c">More...</a><br/></td></tr>
<tr class="separator:ga2f8a8be69355039abd8b1ddf2a236f4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3ac4a7dccb5285b2926f152c3ff12af9"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga3ac4a7dccb5285b2926f152c3ff12af9">GPIO_ClearPinsOutput</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga3ac4a7dccb5285b2926f152c3ff12af9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output level of the multiple GPIO pins to the logic 0.  <a href="#ga3ac4a7dccb5285b2926f152c3ff12af9">More...</a><br/></td></tr>
<tr class="separator:ga3ac4a7dccb5285b2926f152c3ff12af9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf8d77b6a1daf18087dbc6c0814b2ed97"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gaf8d77b6a1daf18087dbc6c0814b2ed97">GPIO_ReadPinInput</a> (GPIO_Type *base, uint32_t pin)</td></tr>
<tr class="memdesc:gaf8d77b6a1daf18087dbc6c0814b2ed97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current input value of the GPIO port.  <a href="#gaf8d77b6a1daf18087dbc6c0814b2ed97">More...</a><br/></td></tr>
<tr class="separator:gaf8d77b6a1daf18087dbc6c0814b2ed97"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
GPIO Reads Pad Status Functions</h2></td></tr>
<tr class="memitem:ga064aa69c0dbb70a4a7344124df9943b1"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga064aa69c0dbb70a4a7344124df9943b1">GPIO_ReadPadStatus</a> (GPIO_Type *base, uint32_t pin)</td></tr>
<tr class="memdesc:ga064aa69c0dbb70a4a7344124df9943b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the current GPIO pin pad status.  <a href="#ga064aa69c0dbb70a4a7344124df9943b1">More...</a><br/></td></tr>
<tr class="separator:ga064aa69c0dbb70a4a7344124df9943b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Interrupts and flags management functions</h2></td></tr>
<tr class="memitem:ga1aac4911f4a4bdfe3c74e50b1d45fbb4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga1aac4911f4a4bdfe3c74e50b1d45fbb4">GPIO_SetPinInterruptConfig</a> (GPIO_Type *base, uint32_t pin, <a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a> pinInterruptMode)</td></tr>
<tr class="memdesc:ga1aac4911f4a4bdfe3c74e50b1d45fbb4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the current pin interrupt mode.  <a href="#ga1aac4911f4a4bdfe3c74e50b1d45fbb4">More...</a><br/></td></tr>
<tr class="separator:ga1aac4911f4a4bdfe3c74e50b1d45fbb4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7c45f4ed2a5ec769e0e4cd2e32f62ad5"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga7c45f4ed2a5ec769e0e4cd2e32f62ad5">GPIO_EnableInterrupts</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga7c45f4ed2a5ec769e0e4cd2e32f62ad5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables the specific pin interrupt.  <a href="#ga7c45f4ed2a5ec769e0e4cd2e32f62ad5">More...</a><br/></td></tr>
<tr class="separator:ga7c45f4ed2a5ec769e0e4cd2e32f62ad5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa1deaff6764df2649453fa5502ee0fcc"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#gaa1deaff6764df2649453fa5502ee0fcc">GPIO_DisableInterrupts</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:gaa1deaff6764df2649453fa5502ee0fcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disables the specific pin interrupt.  <a href="#gaa1deaff6764df2649453fa5502ee0fcc">More...</a><br/></td></tr>
<tr class="separator:gaa1deaff6764df2649453fa5502ee0fcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6efe712710a08ee6e9f89a47a507339f"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga6efe712710a08ee6e9f89a47a507339f">GPIO_GetPinsInterruptFlags</a> (GPIO_Type *base)</td></tr>
<tr class="memdesc:ga6efe712710a08ee6e9f89a47a507339f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads individual pin interrupt status.  <a href="#ga6efe712710a08ee6e9f89a47a507339f">More...</a><br/></td></tr>
<tr class="separator:ga6efe712710a08ee6e9f89a47a507339f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0b1ad50f4212dfb839fd059503f03bed"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#ga0b1ad50f4212dfb839fd059503f03bed">GPIO_ClearPinsInterruptFlags</a> (GPIO_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga0b1ad50f4212dfb839fd059503f03bed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears pin interrupt flag.  <a href="#ga0b1ad50f4212dfb839fd059503f03bed">More...</a><br/></td></tr>
<tr class="separator:ga0b1ad50f4212dfb839fd059503f03bed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structgpio__pin__config__t" id="structgpio__pin__config__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct gpio_pin_config_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:a5eae83ead0519707b896cfa9082c4e82"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#a5eae83ead0519707b896cfa9082c4e82">direction</a></td></tr>
<tr class="memdesc:a5eae83ead0519707b896cfa9082c4e82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the pin direction.  <a href="#a5eae83ead0519707b896cfa9082c4e82">More...</a><br/></td></tr>
<tr class="separator:a5eae83ead0519707b896cfa9082c4e82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d37ffd9a2943f10a91095759bd52da5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d37ffd9a2943f10a91095759bd52da5"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#a9d37ffd9a2943f10a91095759bd52da5">outputLogic</a></td></tr>
<tr class="memdesc:a9d37ffd9a2943f10a91095759bd52da5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a default output logic, which has no use in input. <br/></td></tr>
<tr class="separator:a9d37ffd9a2943f10a91095759bd52da5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2aaf4ec1e85d3fcea653b422c673441e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__gpio__driver.html#a2aaf4ec1e85d3fcea653b422c673441e">interruptMode</a></td></tr>
<tr class="memdesc:a2aaf4ec1e85d3fcea653b422c673441e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Specifies the pin interrupt mode, a value of <a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a>.  <a href="#a2aaf4ec1e85d3fcea653b422c673441e">More...</a><br/></td></tr>
<tr class="separator:a2aaf4ec1e85d3fcea653b422c673441e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="a5eae83ead0519707b896cfa9082c4e82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a> gpio_pin_config_t::direction</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a2aaf4ec1e85d3fcea653b422c673441e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a> gpio_pin_config_t::interruptMode</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>

</div>
</div>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga5aa5229cbd041b11bcf8417ba12896b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FSL_GPIO_DRIVER_VERSION&#160;&#160;&#160;(MAKE_VERSION(2, 0, 0))</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gada41ca0a2ce239fe125ee96833e715c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4"></a>kGPIO_DigitalInput</em>&nbsp;</td><td class="fielddoc">
<p>Set current pin as digital input. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9"></a>kGPIO_DigitalOutput</em>&nbsp;</td><td class="fielddoc">
<p>Set current pin as digital output. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga1b9ad57f43a7be04e31c2e43e92aca39"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga1b9ad57f43a7be04e31c2e43e92aca39a69d618dcf6fc01e5c8315ef1dd4aa66d"></a>kGPIO_NoIntmode</em>&nbsp;</td><td class="fielddoc">
<p>Set current pin general IO functionality. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga1b9ad57f43a7be04e31c2e43e92aca39af6c9ba431378e6290d7033b643e554da"></a>kGPIO_IntLowLevel</em>&nbsp;</td><td class="fielddoc">
<p>Set current pin interrupt is low-level sensitive. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga1b9ad57f43a7be04e31c2e43e92aca39aa445f82a63c5aa94a1e53cdcf52b71d3"></a>kGPIO_IntHighLevel</em>&nbsp;</td><td class="fielddoc">
<p>Set current pin interrupt is high-level sensitive. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga1b9ad57f43a7be04e31c2e43e92aca39ab874f7d31c4bf2f964bf52466d5c40f4"></a>kGPIO_IntRisingEdge</em>&nbsp;</td><td class="fielddoc">
<p>Set current pin interrupt is rising-edge sensitive. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga1b9ad57f43a7be04e31c2e43e92aca39a369cc36a7fda0eb55c4f509070c2d887"></a>kGPIO_IntFallingEdge</em>&nbsp;</td><td class="fielddoc">
<p>Set current pin interrupt is falling-edge sensitive. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga1b9ad57f43a7be04e31c2e43e92aca39ac1d74f985cbebbe8441f6053b8074a50"></a>kGPIO_IntRisingOrFallingEdge</em>&nbsp;</td><td class="fielddoc">
<p>Enable the edge select bit to override the ICR register's configuration. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga8d3aa26ad7e88ef1427e51242a70c259"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GPIO_PinInit </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *&#160;</td>
          <td class="paramname"><em>Config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">pin</td><td>Specifies the pin number </td></tr>
    <tr><td class="paramname">initConfig</td><td>pointer to a <a class="el" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> structure that contains the configuration information. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gadb910aec9a8388b0a387b182a184dff7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GPIO_WritePinOutput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO port pin number. </td></tr>
    <tr><td class="paramname">output</td><td>GPIOpin output logic level.<ul>
<li>0: corresponding pin output low-logic level.</li>
<li>1: corresponding pin output high-logic level. </li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2f8a8be69355039abd8b1ddf2a236f4c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_SetPinsOutput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer (GPIO1, GPIO2, GPIO3, and so on.) </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pin number macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3ac4a7dccb5285b2926f152c3ff12af9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_ClearPinsOutput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO peripheral base pointer (GPIO1, GPIO2, GPIO3, and so on.) </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pin number macro </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf8d77b6a1daf18087dbc6c0814b2ed97"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t GPIO_ReadPinInput </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO port pin number. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">GPIO</td><td>port input value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga064aa69c0dbb70a4a7344124df9943b1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t GPIO_ReadPadStatus </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO port pin number. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">GPIO</td><td>pin pad status value. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga1aac4911f4a4bdfe3c74e50b1d45fbb4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void GPIO_SetPinInterruptConfig </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a>&#160;</td>
          <td class="paramname"><em>pinInterruptMode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">pin</td><td>GPIO port pin number. </td></tr>
    <tr><td class="paramname">pininterruptMode</td><td>pointer to a <a class="el" href="group__gpio__driver.html#ga1b9ad57f43a7be04e31c2e43e92aca39">gpio_interrupt_mode_t</a> structure that contains the interrupt mode information. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga7c45f4ed2a5ec769e0e4cd2e32f62ad5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_EnableInterrupts </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pin number macro. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa1deaff6764df2649453fa5502ee0fcc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_DisableInterrupts </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pin number macro. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga6efe712710a08ee6e9f89a47a507339f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t GPIO_GetPinsInterruptFlags </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">current</td><td>pin interrupt status flag. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0b1ad50f4212dfb839fd059503f03bed"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void GPIO_ClearPinsInterruptFlags </td>
          <td>(</td>
          <td class="paramtype">GPIO_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Status flags are cleared by writing a 1 to the corresponding bit position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>GPIO base pointer. </td></tr>
    <tr><td class="paramname">mask</td><td>GPIO pin number macro. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
